
*******************************************************************************
****				Appendix Table G.10 - REGRESSION OF TOTAL TOLL ON TIME 
****	DIFFERENTIALS: INCLUDING NEGATIVE TRAVEL TIME DIFFERENCE IN RELIABILITY		
*******************************************************************************
use ".\data\clean\I10W_laneuse_dataset_15nov14_wcensus", clear
 merge m:1 date hour using ".\data\clean\HV_ML_reliab.dta", keep(1 3) nogen 
gen reliabilityML=dist/p20_speedML-dist/p50_speedML
gen reliabilityHV=dist/p20_speedHV-dist/p50_speedHV
gen reliability_diff=reliabilityML-reliabilityHV
la var reliability_diff "Reliability"
*WTP calculation
gen TT_dif_hr=dist/MLspeed-dist/ELspeed
gen WTP2=charged_toll/TT_dif_hr
keep if WTP2~=.
drop if ELspeed==.
drop if TT_dif_hr==.
drop if holiday==1
drop if reliability_diff==.
drop if charged_toll==0
la var TT_dif_hr "Time in Hours"
drop if dow==0|dow==6
keep if inlist(hour,5,6,7,8)
keep if acct_type=="PRIVATE"&occupancy~="HOV-3"
 reg charged_toll TT_dif_hr reliability_diff   if TT_dif_hr>0, cluster(rt_id)
est sto a3
 reg charged_toll TT_dif_hr reliability_diff   , cluster(rt_id)
est sto a4
replace reliability_diff=max(reliability_diff,0)
 reg charged_toll TT_dif_hr reliability_diff   if TT_dif_hr>0, cluster(rt_id)
est sto a1
 reg charged_toll TT_dif_hr reliability_diff   , cluster(rt_id)
est sto a2
esttab  a1 a2 a3 a4  using  ".\results\appendix\tabs\ATG10.csv", replace nonumbers nomtitles label ///
	cells(b(star fmt(%9.3f)) se(par)) star(* 0.10 ** 0.05 *** 0.01) stats(r2 N,fmt(%9.3f %9.0g) labels(R-squared N)) ///
	title("Regression of Total Toll on Travel Time Savings: Negative Time Savings and Reliability") order(_cons TT_dif_hr reliability_diff) nonumbers nodepvars ///
insheet using ".\results\appendix\tabs\ATC6.csv", comma clear
export excel using ".\results\appendix\AppendixFigsTabs.xlsx", ///
	sheet("Appendix Table G.10", replace) 
putexcel set ".\results\appendix\AppendixFigsTabs.xlsx", sheet("Appendix Table G.10") modify
putexcel B2="I"
putexcel C2="II"
putexcel D2="III"	
putexcel E2="IV"
putexcel A11="Travel Time Savings > 0"
putexcel A12="Reliability < 0"
putexcel B11 ="Yes"
putexcel B12 ="No"
putexcel C11 ="No"
putexcel C12 ="No"
putexcel D11 ="Yes"
putexcel D12 ="Yes"
putexcel E11 ="No"
putexcel E12 ="Yes"
putexcel A13= "Notes: The table examines the robustness of the central specification to the addition of reliability and the inclusion of trips with negative time savings. Values shown are the coefficients of 4 separate regressions of the toll paid on the regressands. Time, measured in hours, is the time saved by taking the ExpressLanes compared with mainline lanes, from mainline speeds reported by PeMS, for the chosen trip distance. Standard errors, clustered by road segment, are in parentheses. Data cover work days during the morning peak (5-9AM) from February 25th, 2013 until December 30th, 2013. Trips with zero distance traveled, with willingness-to-pay values greater than $2,000 and the 7.22% of observations with negative time saving, are removed. Observations from PeMS where any of the 30 second observations are missing are also dropped. Reliability is constructed from the 50th and 20th quantiles of travel time for the 55 minute window before and after each 5 minute observation. Reliability is the difference between that measure in the mainline and in the ExpressLanes, where negative values are set to zero."
